/**
 * TerminDAO.java
 *
 * author: Daniel Rudigier
 * date: 28.4.2008
 * project: ocumed
 * 
 * Interfaces:
 *  TerminDAO
 */
package ocumed.persistenz.dao;

import java.util.List;

import ocumed.persistenz.hibernate.OcTermin;

/**
 * DAO interface for OcTermin
 */
public interface TerminDAO extends DAOUserTransaction {
    /**
     * Table mapping
     */
    public static final char mitVorbehandlung = '1';
    /**
     * Table mapping
     */
    public static final char ohneVorbehandlung = '0';
    /**
     * Table mapping
     */
    public static final char terminWahrgenommen = '1';
    /**
     * Table mapping
     */
    public static final char terminNichtWahrgenommen = '0';

    /**
     * persist a object, and return the generated id
     *
     * @param transientInstance
     * @return the generated id
     */
    public Integer persist(OcTermin transientInstance);

    /**
     * save or update object.
     *
     * @param instance
     */
    public void attachDirty(OcTermin instance);

    /**
     * has to do with locking.
     * 
     * @param instance
     */
    public void attachClean(OcTermin instance);

    /**
     * delete an instance.
     * 
     * @param persistentInstance
     */
    public void delete(OcTermin persistentInstance);

    /**
     * merge instances 
     *
     * @param detachedInstance
     * @return
     */
    public OcTermin merge(OcTermin detachedInstance);

    /**
     * find by primary key.
     *
     * @param id
     * @return
     */
    public OcTermin findById(int id);
    
    /**
     * find all entries.
     *
     * @return
     */
    public List<OcTermin> findAll();
}